<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%><jsp:useBean id="user" class="com.epam.tcs.filters.User" scope="session"/><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; utf-8">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/main.css"/>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/jquery-ui-1.8.21.custom.css"/>
<script src="${pageContext.request.contextPath}/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery-ui-1.8.21.custom.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.ui.datepicker-ru.js" type="text/javascript"></script> 
<title>Страничка</title>
</head>
<body>
<div id="wrapper">
	<div id="header">
		<span class="logo"><img src="${pageContext.request.contextPath}/img/header-logo.png" /></span>
		<span class="logo_text"> Проект: "Образование"</span>
		<c:if test="${sessionScope.user != null}" >
		<span class="author">
			<p>${sessionScope.user.getRole()}: ${sessionScope.user.getName()}</p>
			<p><a href="${pageContext.request.contextPath}/exit">Выйти</a></p>
		</span>
		</c:if>
	</div>
	<div id="menu">
		<ul>
			<c:choose>
			<c:when test="${sessionScope.user.getRole() == 'student'}" >
				<li name="lecture"><a href="${pageContext.request.contextPath}/tcs/lecture">Моя программа</a></li>
				<li name="practice"><a href="${pageContext.request.contextPath}/tcs/practice">Мои задания</a></li>
				<li name="group"><a href="${pageContext.request.contextPath}/tcs/group">Моя группа</a></li>
			</c:when>
			<c:when test="${sessionScope.user.getRole() == 'teacher'}" >
				<li name="group"><a href="${pageContext.request.contextPath}/tcs/group">Группы</a></li>
				<li name="student"><a href="${pageContext.request.contextPath}/tcs/student">Студенты</a></li>
				<li name="program"><a href="${pageContext.request.contextPath}/tcs/program">Программы</a></li>
				<li name="theme"><a href="${pageContext.request.contextPath}/tcs/theme">Темы</a></li>
				<li name="lecture"><a href="${pageContext.request.contextPath}/tcs/lecture">Лекции</a></li>
				<li name="practice"><a href="${pageContext.request.contextPath}/tcs/practice">Практики</a></li>
				<li name="learning"><a href="${pageContext.request.contextPath}/tcs/learning">Учебный процесс</a></li>
			</c:when>
			</c:choose>
		</ul>
		<div style="clear:both"></div>
	</div>
	<script type="text/javascript">
		$(function(){
			var url = window.location.toString().split('${pageContext.request.contextPath}')[1];
			switch (url.split("?")[0]) {
				case "/tcs/group":
					$("li[name = 'group']").addClass("selected");
					break;
				case "/tcs/student":
					$("li[name = 'student']").addClass("selected");
					break;
				case "/tcs/program":
					$("li[name = 'program']").addClass("selected");
					break;
				case "/tcs/theme":
					$("li[name = 'theme']").addClass("selected");
					break;
				case "/tcs/lecture":
					$("li[name = 'lecture']").addClass("selected");
					break;
				case "/tcs/practice":
					$("li[name = 'practice']").addClass("selected");
					break;
				case "/tcs/learning":
					$("li[name = 'learning']").addClass("selected");
					break;
			}
		});
	</script>